package com.dragon.common.spring.business.base.jpa.audit;

import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.AuditorAware;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

import java.util.Optional;

/**
 * @author Chris Chan
 * Create On 2025/8/4 上午10:16
 * Use for:
 * Explain:
 */
@Configuration
@EnableJpaAuditing(auditorAwareRef = "commonAuditorAware")
public class CommonAuditorAware implements AuditorAware<String> {
    @Override
    public Optional<String> getCurrentAuditor() {
        return Optional.of("chris");
    }
}
